package com.example.safeassistan.message.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.safeassistan.R;
import com.example.safeassistan.base.BaseActivity;

public class SendMessageNotice  extends BaseActivity implements View.OnClickListener {
    private TextView _barTvRight;
private int type=0;//0 消息 1 通知

    public static void actionStart(Context context,int type ) {
        Intent intent = new Intent(context, SendMessageNotice.class);
        intent.putExtra("type",type);
        context.startActivity(intent);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id._barTvRight:
                //发送
                break;
        }
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        setAndroidNativeLightStatusBar(true);
    }

    @Override
    protected int setLayoutResourceID() {
        return R.layout.activity_send_message_notice;
    }

    @Override
    protected void initView() {
        type=getIntent().getIntExtra("type",0);
        switch (type){
            case 0:
                setTitleText("发消息");
                break;
            case 1:
                setTitleText("发通知");
                break;
        }
        _barTvRight=findViewById(R.id._barTvRight);
        _barTvRight.setText("发送");
        _barTvRight.setTextColor(getResources().getColor(R.color.blue_3B5BEA));
        _barTvRight.setVisibility(View.VISIBLE);
        _barTvRight.setOnClickListener(this::onClick);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getTitleBarType() {
        return 0;
    }
}
